//
//	Created By Pavel Yankelevich
//	Wednesday, March 26, 2008
//
using fit;
using OneDayModel.Interfaces;
using OneDayModel.Model;
using OneDayModel.Tests.Fits.UIUsers;
using OneDayModel.Tests.Mocks;

namespace OneDayModel.Tests.Fits.Fixtures.Scenarios
{
    public class AddPictureToAlbumFixture : Fixture
    {
        private UploadPictureUser uploadPictureUser;
        private string albumName;
        private string pictureName;


        public AddPictureToAlbumFixture()
        {
            UsersFactory userFactory =
                (UsersFactory)TestUtils.ContextManager.TestContext[typeof(UsersFactory).ToString()];

            uploadPictureUser = userFactory.GetUploadPictureUser();
        }

        public void OwnerAlias(string alias)
        {
            uploadPictureUser.SetContextUser(alias);

        }

        public void AlbumName(string albumName)
        {
            this.albumName = albumName;
        }

        public void AddPicture()
        {
            
        }

        public void PictureName(string pictureName)
        {
            this.pictureName = pictureName;
        }

        public void UploadPicture()
        {
            uploadPictureUser.SetPictureName(pictureName);
            uploadPictureUser.SetAlbumName(albumName);
            uploadPictureUser.UploadPicture();
        }

        public string ShownError()
        {
            return uploadPictureUser.ShownError;
        }
    }
}